home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
etc
/
init.d
/
autoconfig.z
/
autoconfig
Wrap
Text File
|
1992-04-03
|
2KB
|
97 lines
#!/bin/sh
#Tag 0x00000800
# automatically re-configure the kernel
# "$Revision: 1.19 $"
LBOOTOPTS=
FORCE="-t"
USAGE="`basename $0`: [-vf] [-p toolroot] [-d /usr/sysgen] [-o lbootopts] [start|stop]"
while getopts "vfp:d:o:" c; do
case $c in
v) if test "$verbose" = "-v"; then
set -x
else
verbose="-v"
LBOOTOPTS="$LBOOTOPTS -v"
fi
;;
f) FORCE=""
UNIX=${UNIX:=/unix.install};;
p) TOOLROOT="$OPTARG";;
d) SYSGEN="$OPTARG";;
o) LBOOTOPTS="$LBOOTOPTS $OPTARG";;
\?) echo $USAGE; exit 1;;
esac
done
shift `expr $OPTIND - 1`
SYSGEN=${SYSGEN:=/usr/sysgen}
BOOTAREA=${BOOTAREA:=${SYSGEN}/boot}
SYSTEM=${SYSTEM:=${SYSGEN}/system}
MASTERD=${MASTERD:=${SYSGEN}/master.d}
UNIX=${UNIX:=/unix}
# TOOLROOT and ROOT control where lboot looks for tools and does its work
# TOOLROOT is normally set in the system file.
TOOLROOT=${TOOLROOT:=$SYSGEN/root}
export TOOLROOT
LBOOT=/usr/sbin/lboot
SETSYM=/usr/sbin/setsym
LBOOTOPTS="$LBOOTOPTS $FORCE -m $MASTERD -b $BOOTAREA -s $SYSTEM -u $UNIX"
cd /
case $1 in
""|start)
for nm in $LBOOT $TOOLROOT/usr/bin/cc $TOOLROOT/usr/bin/ld; do
if test ! -x $nm; then
echo "`basename $0`: cannot find $nm" 1>&2
exit 1
fi
done
for nm in $BOOTAREA $MASTERD; do
if test ! -d $nm; then
echo "`basename $0`: cannot find $nm" 1>&2
exit 1
fi
done
for nm in $SYSTEM; do
if test ! -f $nm; then
echo "`basename $0`: cannot find $nm" 1>&2
exit 1
fi
done
# note - set -e in a case stmt doesn't work right in /bin/sh
rm -rf ${UNIX}.install
$LBOOT $LBOOTOPTS
if [ $? != 0 ]
then
# dont print anything since a no answer to Automatically ..
# causes lboot ot exit 1
exit 1
fi
if test -x $SETSYM -a -w ${UNIX}.install; then
$SETSYM ${UNIX}.install
fi
;;
stop)
exit 1
;;
*)
echo "$USAGE"
exit 1
;;
esac